package com.kavitha.learn.spring1;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

	@SuppressWarnings({ "resource"})
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
		EmployeeDAO employeeDAO1 = context.getBean(EmployeeDAO.class);
		//BeanFactory factory = new XmlBeanFactory(new FileSystemResource("src/main/resources/beans.xml"));
		//EmployeeDAO employeeDAO2 = factory.getBean(EmployeeDAO.class);
		System.out.println(employeeDAO1.getAllEmployees());
		//System.out.println(employeeDAO2.getAllEmployees());
	}

}
